<!--
Reference
Species
Tissue type
Original identifier
Protein name
Measured mass
# Meth. loss
# Acetylation
Other mods.
-->

<table id="literatureList">
  <thead>
    <tr>
      <th style="border-bottom: none;">Protein name</th>
      <th style="border-bottom: none;">Measured mass</th>
      <th style="border-bottom: none;"># of (methionine losses / acetylations)</th>
      <th style="border-bottom: none;">Other mods.</th>
      <th style="border-bottom: none;">Publication</th>      
      <th style="border-bottom: none;">Species</th>
      <th style="border-bottom: none;">Tissue</th>
      <th style="border-bottom: none;">Original Identifier</th>
    </tr>
  </thead>
  <tbody>
    <g:each in="${result}" var="row">
      <tr>
        <th>${row.proteinName}</th>
        <th class="right">${row.measuredMass}</th>
        <th class="right">${row.methioninLoss} / ${row.acetylation}</th>
        <th>${row.otherModes}</th> 
        <th class="left"><a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/${row.pubmedID}"> ${row.publication}</a></th>
        
        <th>${row.species}</th>
        <th>${row.tissue}</th>
        <th>${row.originalIdentifier}</th>
      </tr>
    </g:each>
  </tbody>
</table>
<script type="text/javascript">
  $(document).ready(function() {
    var oTable2;

    /*/ Add the events etc before DataTables hides a column */
    //$("thead input").keyup( function () {
        /* Filter on the column (the index) of this element */
    //    oTable2.fnFilter( this.value, oTable2.oApi._fnVisibleToColumnIndex(
    //            oTable2.fnSettings(), $("thead input").index(this) ) );
    //} );

    /*
    * Support functions to provide a little bit of 'user friendlyness' to the textboxes
    */
    $("thead input").each( function (i) {
        this.initVal = this.value;
    } );

    $("thead input").focus( function () {
        if ( this.className == "search_init" )
        {
                this.className = "";
                this.value = "";
        }
    } );

    $("thead input").blur( function (i) {
        if ( this.value == "" )
        {
                this.className = "search_init";
                this.value = this.initVal;
        }
    } );

    oTable2 = $('#literatureList').dataTable( {
        "sDom": 'RC<"clear">lfrtip',
        "bInfo": false,
        "bPaginate": false,
        "bSortCellsTop": true,
        "sScrollY": "580"
    } );
  } );
</script>